﻿#include "QMyTableWidget.h"
#include <qdebug.h>

QMyTableWidget::QMyTableWidget(QWidget *parent)
    :QTableWidget(parent)
{
    setEditTriggers(QAbstractItemView::NoEditTriggers);     // 设置编辑触发:单元格不可编辑
    setSelectionBehavior(QAbstractItemView::SelectRows);    // 设置选择行为:按行选择
    setSelectionMode(QAbstractItemView::ExtendedSelection); // 设置选择模式:可进行多选
}

void QMyTableWidget::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
{
    qDebug()<<"123";
    QTableWidget::selectionChanged(selected,deselected);
}
